[mirrors]
ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.06.tar.gz

[vars]
filesize=595550
sha512=5fae9938f0f7586d13a04b20751ccffb1d0c067842f24c831dce354b075eb290491806a9d40ac36598cf05b35a1bd5be14e834aa7420b7e0fa960a9d7f7e4fd5

[deps]
libressl

[build]
patch -p1 < "$K"/stunnel-libressl.patch

if [ -n "$CROSS_COMPILE" ] ; then
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
  xconfflags="$xconfflags -with-ssl=$butch_root_dir$butch_prefix"
fi
sed -i 's@-fstack-protector@-ffoobar@g' configure
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
